<?php

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'hyho',
    'defaultController' => 'site',
    'language' => 'ru',
    'theme' => 'classic',

    'import' => array(
        'ext.eoauth.*',
        'ext.eoauth.lib.*',
        'ext.lightopenid.*',
        'ext.eauth.services.*',
        'application.models.*',
        'application.components.*',
        'application.helpers.*',
        'application.filters.setReturnUrl.ESetReturnUrlFilter'
    ),
    'components' => array(

        'loid' => array(
            'class' => 'ext.lightopenid.loid'
        ),

        'eauth' => array(
            'class' => 'ext.eauth.EAuth',
            'popup' => true,
            'services' => array(
                'google' => array(
                    'class' => 'GoogleOpenIDService'
                ),
                'yandex' => array(
                    'class' => 'YandexOpenIDService'
                ),
                'facebook' => array(
                    //https://developers.facebook.com/apps/212430778822248/summary
                    'class' => 'FacebookOAuthService',
                    'client_id' => '212430778822248',
                    'client_secret' => '7cc0c0a96514eb311a47980c1082b2d1'
                ),
                'vkontakte' => array(
                    //http://vkontakte.ru/editapp?id=2641336
                    'class' => 'VKontakteOAuthService',
                    'client_id' => '2641336',
                    'client_secret' => 'RpZM7X42HkZHLKQfdGXQ'
                ),
                'mailru' => array(
                    //http://api.mail.ru/sites/my
                    'class' => 'MailruOAuthService',
                    'client_id' => '646323',
                    'client_secret' => 'b086116744bbf858193d6914537500f2'
                )
            )
        ),

        'cache' => array(
            'class' => 'system.caching.CFileCache'
        ),

        'image' => array(
            'class' => 'application.extensions.image.CImageComponent',
            'driver' => 'GD',
            'params' => array(
                'directory' => '/opt/local/bin'
            )
        ),
        'db' => require_once(dirname(__FILE__) . '/db.php'),

        'user' => array(
            'class' => 'WebUser',
            'allowAutoLogin' => true,
            'loginUrl' => array('/login')
        ),

        'email' => array(
            'class' => 'application.extensions.email.Email'
        ),

        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'rules' => require(dirname(__FILE__) . '/urlrules.php')
        )
    ),

    'params' => require(dirname(__FILE__) . '/params.php')
);
